<?php
include APPPATH."views/frontend/inc/01_meta.php";
include APPPATH."views/frontend/inc/02_head.php";
?>
<?php
if(!empty($cate->Thumb)){
	?>
	<div class="banner">
		<img style="position: absolute;width: 100%;height: 100%" src="<?php echo $cate->Thumb ?>"/>
	</div>
<?php
}else{
?>
	<div class="banner-product"></div>
<?php
}
?>

<div class="navi">
	<a href="/home">Home</a>
	<span>/</span>
	<span class="active"><?php echo $cate_type['name']?></span>
	<div class="clear"></div>
</div>
<script type="text/javascript">
    var cookie_name = 'cat_all_<?php echo $cate_type['key'] ?>';
    var filter_cate = null;
    var category_type = "<?php echo $cate_type['key'] ?>";
    var page = 1;
    $(document).ready(function() {
        product_list_init();
    });
</script>
<div>
	<div class="menu-left">
		<?php
		$cate_all = "category_".$cate_type['key'];
		if(!empty($$cate_all)){
			foreach($$cate_all as $group_cate){
			?>
                <div class="panel-group accordion" id="accordion-color-<?php echo $group_cate->Alias?>">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <?php echo $group_cate->Title?>
                                <span data-toggle="collapse" data-parent="#accordion-size" href="#collapseOne<?php echo $group_cate->Alias?>"
                                      class="ico-collapse pull-right"></span>
                            </h4>
                        </div>
                        <div id="collapseOne<?php echo $group_cate->Alias?>" class="panel-collapse collapse in">
                            <div class="panel-body">
                                <ul class="search-menu-control">
                                    <?php
                                    if(!empty($group_cate->Children)){
                                        foreach($group_cate->Children as $c){
                                            ?>
                                            <li class="item">
                                                <div class="dot">
                                                    <a href="/category/<?php echo $cate_type['key']?>/<?php echo $group_cate->Id?>-<?php echo $group_cate->Alias?>/<?php echo $c->Id?>-<?php echo $c->Alias?>/">
                                                        <?php echo $c->Title?>
                                                    </a>
                                                </div>
                                            </li>
                                            <?php
                                        }
                                    }else{
                                        ?>
                                        <li>No data to display</li>
                                        <?php
                                    }
                                    ?>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
			<?php
			}
		}
		?>
	</div>
	<div class="main-content">
        <div>
            <?php include APPPATH . "views/frontend/product/03_product_list.php";?>
        </div>
    </div>
</div>
<div class="clear"></div>
<?php
include APPPATH."views/frontend/inc/03_foot.php";
?>